<%-- 
    Document   : testjquery
    Created on : Jan 5, 2014, 11:13:01 PM
    Author     : THICH HOA DONG TIEN
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
        <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js">
        </script>
        <script>
           function showform(x){
               alert($("#divkq"+x).attr("itemid"));
           }

        </script>
        

    </head>
    <body>
        <div id="testx">
            <%
                int stt = 0;
                for (int i = 0; i < 5; i++) {
                    stt++;

            %>

            <div id="<%=stt%>"style="width: 100px; height: 100px; background: blue" onclick="showform(this.id)"><a href="#">Edit</a></div>
                <div id="divkq<%=stt%>" itemid="<%=stt%>"></div>

                <%
                        
                    }
                %>
            
        </div>
    </body>
</html>
